<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>2.模拟一个数据代理</title>
    </head>
    <body>
        <script type="text/javascript" >
            let vm = {}
            vm.$attrs = {}
            vm.$children = []
            vm._c = function(){}

            vm._data = {a:1}

            Object.defineProperty(vm,'a',{
                get:function proxyGetter(){
                    return vm._data.a
                },
                set:function proxySetter(value){
                    vm._data.a = value
                }
            })
        </script>
    </body>
</html>